package com.as.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user", catalog = "calculate")
public class User implements java.io.Serializable {

	// Fields

	private String userid;
	private String username;
	private String password;
	private Integer classnum;
	private Integer level;
	private String email;
	private String relateid;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String userid, String username, String password,
			Integer classnum, Integer level, String email) {
		this.userid = userid;
		this.username = username;
		this.password = password;
		this.classnum = classnum;
		this.level = level;
		this.email = email;
	}

	/** full constructor */
	public User(String userid, String username, String password,
			Integer classnum, Integer level, String email, String relateid) {
		this.userid = userid;
		this.username = username;
		this.password = password;
		this.classnum = classnum;
		this.level = level;
		this.email = email;
		this.relateid = relateid;
	}

	// Property accessors
	@Id
	@Column(name = "userid", unique = true, nullable = false, length = 30)
	public String getUserid() {
		return this.userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	@Column(name = "username", nullable = false, length = 30)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password", nullable = false, length = 30)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "classnum", nullable = false)
	public Integer getClassnum() {
		return this.classnum;
	}

	public void setClassnum(Integer classnum) {
		this.classnum = classnum;
	}

	@Column(name = "level", nullable = false)
	public Integer getLevel() {
		return this.level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	@Column(name = "email", nullable = false, length = 30)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "relateid", length = 30)
	public String getRelateid() {
		return this.relateid;
	}

	public void setRelateid(String relateid) {
		this.relateid = relateid;
	}

}